<?php
Util::tsRegisterAssetJs('adminMaster.js');
$this->beginWidget('zii.widgets.CPortlet', array(
    'title' => InfoCartaSemanal::label(),
));
?>
<div class="row-fluid" style="overflow:auto;">
    <p class="note">
        <?php echo Yii::t('AweCrud.app', 'Fields with') ?> <span class="required">*</span>
        <?php echo Yii::t('AweCrud.app', 'are required') ?>.    </p>

    <?php echo $form->errorSummary($model) ?>
    <?php echo $form->hiddenField($model, 'id') ?>
    <div class="span6"></div>
    <div class="span6">
        <?php echo $form->dropDownListRow($model, 'nombre_CIBV', array('' => ' -- Seleccione -- ') + CHtml::listData(Institucion::model()->findAll(), 'id', Institucion::representingColumn())) ?>
    </div>
    <div class="span6"></div>
    <div class="span6">
        <?php echo $form->textFieldRow($model, 'entidad_ejecutora', array('maxlength' => 100)) ?>
    </div>
    <div class="span6"></div>
    <div class="span6">
        <?php echo $form->textFieldRow($model, 'responsable', array('maxlength' => 100)) ?>
    </div>
    <div class="span6"></div>
    <div class="span6">
        <?php echo $form->textFieldRow($model, 'numero_ninos', array('maxlength' => 100)) ?>
    </div>
    <div class="span6"></div>
    <div class="span6">
        <?php
        if ($model->isNewRecord) {
            echo $form->datepickerRow($model, 'fecha_inicial', array(
                'readOnly' => 'true', 'style' => "cursor: default",
                'options' => array(
                    'format' => 'yyyy-mm-dd',
                    'startDate' => 'now',
                    'weekStart' => 1,
                    'daysOfWeekDisabled' => '0,2,3,4,5,6',
                    'todayHighlight' => true,
                    'autoclose' => 'true',
                    'orientation' => 'bottom left',
                    'language' => 'es',
                ),
                'class' => 'input-large'
                    )
            );
        } else {
            echo $form->textFieldRow($model, 'fecha_inicial', array('readOnly' => true));
        }
        ?>
    </div>
    <div class="span6"></div>
    <div class="span6">
        <?php echo $form->textFieldRow($model, 'fecha_fin', array('readOnly' => true)) ?>
    </div>
    <div class="span6"></div>
    <div class="span6">
        <?php echo $form->textFieldRow($model, 'personal_comunitario', array('maxlength' => 100)) ?>
    </div>
</div>
<div class="form-actions" id="btnInfo-Carta-Semanal">
    <?php
    $this->widget('bootstrap.widgets.TbButton', array(
        'buttonType' => 'submit',
        'id' => 'btn-Guardar-Info-Carta',
        'type' => 'primary',
        'label' => $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save'),
    ));
    ?>
    <?php
    $this->widget('bootstrap.widgets.TbButton', array(
        //'buttonType'=>'submit',
        'label' => Yii::t('AweCrud.app', 'Cancel'),
        'htmlOptions' => array('onclick' => 'javascript:history.go(-1)')
    ));
    ?>
</div> 

<?php $this->endWidget(); ?>